package com.dic.flowfrom.model;


import java.util.Set;
import java.util.TreeSet;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.dic.common.base.model.BaseModel;
import lombok.Data;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

//import com.common.base.module.BaseModule;
//import com.wf.flowClassify.module.FlowClassify;

@Entity
@Table(name="WF_FORM")
//@Cache(usage=CacheConcurrencyStrategy.READ_WRITE,region="wf_cache")
@Data
public class Form extends BaseModel {
	
	private static final long serialVersionUID = 6559361680742466992L;
	@Column(name = "FORM_NAME",length=16)
	private String formName; //表单名称
	@Column(name = "FORM_CODE",length=16)
	private String formCode; //表单编码
	@Column(name = "FORM_TABLE_NAME",length=512)
	private String formTableName; //表单数据库名称
	@Lob
	@Basic(fetch = FetchType.LAZY)
	@Column(name = "FORM_HTML", columnDefinition = "BLOB",nullable=true)
	private byte[] formHtml;
	@Column(name = "STATE_")
	private Integer state;//状态
//	private FlowClassify flowClassify;//流程分类
    @Column(name = "FORM_DEPICT",length=512)
	private String formDepict;//表单描述
	@Column(name = "PATH_",length=512)
	private String path;
	@Column(name = "type_")
	private Integer type;//类型 1：自定义表单  2：系统表单
	
//	private Set<FormElement> formElements = new TreeSet<FormElement>();
	
}
